package com.guigu.controller;


import com.guigu.pojo.GatherDetails;
import com.guigu.service.GatherDetailsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * <p>
 * 入库单明细表 前端控制器
 * </p>
 *
 * @author Mr.Zhang
 * @since 2025-03-12
 */
@CrossOrigin
@RestController
@RequestMapping("/gather-details")
public class GatherDetailsController {
    @Autowired
    private GatherDetailsService gatherDetailsService;

    @GetMapping("/{gatherId}")
    @ResponseBody
    public List<GatherDetails> getProductDetails(@PathVariable Integer gatherId) {
        List<GatherDetails> gatherDetails = gatherDetailsService.getGatherDetails(gatherId);
        System.out.println(gatherDetails);
        return gatherDetails;
    }

}

